package org.jeecg.common.exception;

/**
 * @Description: jeecg-boot自定义异常
 * @author: jeecg-boot
 */
public class MakeFriendsBaseException extends RuntimeException {
	private static final long serialVersionUID = 1L;

	public int getCode() {
		return code;
	}

	public String getMsg() {
		return msg;
	}

	public boolean isCanRetry() {
		return canRetry;
	}

	private int code;
	private String msg;
	private boolean canRetry = true;

	public MakeFriendsBaseException(String msg) {
		this.msg = msg;
	}
	public MakeFriendsBaseException(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public MakeFriendsBaseException(Throwable cause, int code, String msg) {
		super(cause);
		this.code = code;
		this.msg = msg;
	}

	@Override
	public String getMessage() {
		return code + ":" + msg;
	}
}
